
let url=`https://api-hmugo-web.itheima.net/api/`
function http(site,method='GET',data={}){
  return new Promise((resolve,reject)=>{
    wx.request({
      url: url+site,
      method:method,
      data:data,
      success:(res)=>{
        resolve(res)
      },
      fail:(orren)=>{
        reject(orren)
      }
    })
  })
}
export default http